<%-- 
    Document   : ficheproduitEnchere
    Created on : 6 avr. 2013, 22:57:49
    Author     : Alice
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html>

<jsp:include page="header.jsp"></jsp:include>

<s:div id="bloc_contenu">
    <h2>Fiche produit</h2>

    <s:div id="bloc_produit_description">
        <table border="0" width="845px">
            <tr>
                <td valign="top" class="td_miniature"><img src="pages/img/img_produit_type/${product.idProductType}.jpg" width="90%" height="90%"/>
                </td>
                <td valign="top"><b>${product.title}</b><br /><br />${product.description}

                    <br /><br /><br />
                    <h2>Je souhaite enchérir</H2>
                        ${message}
                        <s:form name="formEncherir" namespace="/" action="encherir">
                            <s:textfield label="Saisir le montant" name="montant"/>
                            <s:hidden name="idProduct" value="%{#parameters.idProduct}"></s:hidden>
                            <s:submit type="image" value="connection" src="pages/img/btn_encherir.png" cssClass="espace_top"/>         
                        </s:form>


                </td>
                <td valign="top" class="bloc_info_enchere" ><font color="orange" size="4"><b>Prix : 
                        <s:if test="#session['USER'] != null">
                                    <s:if test="#session['USER'].getCountry().devise=='USD'">
                                        <fmt:formatNumber maxFractionDigits="2"><c:out value="${bid.bidPrice*sessionScope['RATE']}" /></fmt:formatNumber> $
                                    </s:if>
                                    <s:else>
                                        ${bid.bidPrice} €
                                    </s:else>
                                </s:if>
                                <s:else>
                                    ${bid.bidPrice} €
                                </s:else>
                    </b></font><br />
                    <i><font color="grey" size="2">(Mis à jour le : 
                        ${bid.dateCrea})</font></i><br /> <br />
                        <b>Date de mise en enchère :</b><br /> <fmt:formatDate value="${product.createDate}" pattern="dd/MM/yyyy à HH:mm" />  <br /><br />
                        <b> Date de fin de l'enchère :</b><br /> <fmt:formatDate value="${product.bidEndDate}" pattern="dd/MM/yyyy à HH:mm" /> <br /><br />

                    <b>${product.store.name}</b><br />
                    Adresse : ${product.store.adresse}  <br />
                    ${product.store.code.label}

                </td>
            </tr>
        </table>
    </s:div>




</s:div>
<jsp:include page="footer.jsp"></jsp:include>
